#ifndef _GOVT_FUZZY_HPP_
#define _GOVT_FUZZY_HPP_
/*******************************************************************************
 ** Government Sanctioned Espionage RPG                                       **
 ** http://www.government-sanctioned.us/                                      **
 **===========================================================================**
 ** Name: fuzzy.hpp                                                           **
 ** Description: Fuzzy logic sets.                                            **
 **                                                                           **
 ** Open Source Initiative (OSI) Approved License                             **
 **                                                                           **
 ** The contents of this file are subject to the terms of the                 **
 ** Common Development and Distribution License, Version 1.0 only             **
 ** (the "License").  You may not use this file except in compliance          **
 ** with the License.                                                         **
 **                                                                           **
 ** You can find a copy of the license in the LICENSE file within             **
 ** this distribution or at $WIKI/display/GOVT/License-software.              **
 ** Software distributed under the License is distributed on an "AS IS"       **
 ** basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.           **
 ** See the License for the specific language governing permissions           **
 ** and limitations under the License.                                        **
 **                                                                           **
 ** When distributing Covered Code, include this CDDL header in each          **
 ** file and include the License file at $GAME_DIR/LICENSE.                   **
 ** If applicable, add the following below this header, with the indicated    **
 ** fields enclosed by brackets "[]" replaced with your own identifying       **
 ** information: Portions Copyright [yyyy] [name of copyright owner]          **
 **                                                                           **
 ** Copyright (c) 2009-2012  Barry Gian James <gian@gamingods.net>            **
 ** All rights reserved.                                                      **
 ******************************************************************************/

// $Id$
// Modified $Date$ by $Author$

#include <string>

namespace fuzzy
{
//! @class category
//! @brief Implements fuzzy categories with variable membership values
class category
{
public:
	category(std::string n, double l, double m, double h) : _low(l), _mid(m), _high(h)
	{ _name = n; }
	category() { }

	std::string &	name() { return _name; }
	void			range(double l, double m, double h) { _low = l; _mid = m; _high = h; }
	double			low() { return _low; }
	double			mid() { return _mid; }
	double			high() { return _high; }
	double			membership(double);


private:
	std::string	_name;
	double		_low, _mid, _high;
};

}	/* namespace fuzzy */

#endif /* _GOVT_FUZZY_HPP_ */
